package com.dxysun.spring.annotation.bean;

import org.springframework.stereotype.Component;

@Component
public class MyBean
{

    public void hello(String str) throws InterruptedException
    {

        if("s".equals(str))
        {
            System.out.println("sleep");
            Thread.sleep(5000);
            System.out.println("over");
        }
        else
        {
            System.out.println("run over");
        }
    }
}
